package com.itstyle.seckill.repository;

import com.itstyle.seckill.common.entity.RedPacket;
import com.itstyle.seckill.common.entity.Result;

import java.util.Optional;

public class I {
    ///dajhfjadgfahdhfjadhfajdfgajdgf

    public static void main(String[] args) {
        RedPacket redPacket = new RedPacket();
        RedPacket redPacket1 = null;
        redPacket.setId(1L);
        RedPacket result = Optional.ofNullable(redPacket1).orElse(redPacket);
        System.out.println(result.getId());
    }
}